package com.yizhang.pattern.observer.guava;

import com.google.common.eventbus.EventBus;

/**
 * @Author: yi.zhang
 * @CreateTime: 2025-08-25 14:44:43
 * @Description:
 */
public class Test {
    public static void main(String[] args) {
        EventBus eventBus = new EventBus();

        PojoEvent pojoEvent = new PojoEvent();
        MapperEvent mapperEvent = new MapperEvent();
        eventBus.register(pojoEvent);
        eventBus.register(mapperEvent);
//        eventBus.post(new Pojo("pojo您好"));
        eventBus.post(new Mapper("mapper您好"));
    }
}
